package com.etone.smartAudit.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.etone.smartAudit.domain.ItemType;
import com.etone.smartAudit.mapper.ItemTypeMapper;
import com.etone.smartAudit.vo.PagerVO;
import com.etone.smartAudit.vo.itemType.ItemTypeSimpleVO;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.springframework.stereotype.Service;

/**
 * @author: sovy
 * @date: 2020/9/21
 * @description:
 */

@Service
public class ItemTypeService extends ServiceImpl<ItemTypeMapper, ItemType> {

    /**
     * 查询项目类型基本信息列表
     *
     * @param page
     * @param pageSize
     * @return
     */
    public PagerVO<ItemTypeSimpleVO> listItemVOSimpleList(int page, int pageSize) {
        Page<ItemTypeSimpleVO> itemTypeSimpleVOPage = PageHelper.startPage(page, pageSize).doSelectPage(() -> baseMapper.listItemTypeSimpleVOList());
        return PagerVO.of(itemTypeSimpleVOPage);
    }
}
